RapidSpellChecker

Provides a model (business/logic) level spell checker API which can be used in a client-server environment and any applications where a client GUI does not exist. RapidSpellChecker has been benchmarked at checking 70,000 words/second on a standard 1GHz PC. User dictionaries can optionally be used, allowing words to be added. This component can be used in 2 different ways, in an iterative fashion or on a query by query basis. Please see the API docs for code level details.

Using RapidSpellChecker in an iterative manner provides complete textual correction of strings similar to a GUI based spell checker. A string is loaded into RapidSpellChecker and then successive calls to the NextBadWord() method move through the string allowing FindSuggestions() and ChangeBadWord(replacement) to be called to find spelling suggestions and optionally correct the misspelt words in the text, finally GetAmendedText() returns the corrected text.

Alternatively RapidSpellChecker may be used in a simple query by query basis, calls to LookUp(word) and FindSuggestions(word) methods allow bare bones spell checking functionality.

Key API Points

Key Methods  
RapidSpellChecker()  - argumentless constructor
Check(text [, startPosition])  - begins checking text
FindSuggestions(word)  - finds suggestions for word
LookUp(word)  - checks if word is in either main or user dictionaries
SetUserDictionary(file)  - allows you to define which file will be used as a user dictionary
IgnoreAll(word)  - ignores all future occurrences of word
AddWord(word)  - adds word to the user dictionary if it exists
NextBadWord()  - finds the next misspelt word in the text
ChangeBadWord(newWord)  - changes the misspelt word last identified by NextBadWord()
GetAmendedText()  - returns the corrected text

Query by Query Usage Sequence Diagram

Iterative Usage Sequence Diagram

See Examples section for more details.